<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <script src="jquery-1.8.2.js"></script>
  <style>
    a{
      display: block;
      width:200px;
      height: 60px;
      background-color: #999999;
    }
  </style>
</head>
<body>
  <a href="#"></a>
  <script>
    var element = $("a")[0];
    var url = 'readFile.swf';
    var str = '<object type="application/x-shockwave-flash" data="' + url + '" style="display:block;" width="165" height="30" id="ReadFileSwf">'
            + '<param name="allowScriptAccess" value="always" />'
            + '<param name="quality" value="high">'
            + '<param name="wmode" value="transparent">'
            + '<param name="movie" value="' + url + '">'
           // + '<embed src="' + url + '" name="ReadFileSwf" quality="high" allowScriptAccess="always"  swLiveConnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"   width="165" height="30"></embed>'
            + '</object>';
    $(element).html(str);
    var obj = document.getElementById("ReadFileSwf");//$(element).find("object")[0];
    $(element).on("click", function (){
      obj.fileBrowser();
    })
  </script>
</body>
</html>